<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, user-scalable=0">

		<title>地址管理</title>

		<link href="${basePath!}/static/AmazeUI-2.4.2/assets/css/admin.css" rel="stylesheet" type="text/css">
		<link href="${basePath!}/static/AmazeUI-2.4.2/assets/css/amazeui.css" rel="stylesheet" type="text/css">

		<link href="${basePath!}/static/css/personal.css" rel="stylesheet" type="text/css">
		<link href="${basePath!}/static/css/addstyle.css" rel="stylesheet" type="text/css">
		<link href="${basePath!}/static/css/bootstrap.min.css" rel="stylesheet" type="text/css">
		<script src="${basePath!}/static/AmazeUI-2.4.2/assets/js/jquery.min.js" type="text/javascript"></script>
		<script src="${basePath!}/static/AmazeUI-2.4.2/assets/js/amazeui.js"></script>
		<script src="${basePath!}/static/js/bootstrap.min.js"></script>
		<script src="${basePath!}/static/js/distpicker.data.js"></script>
		<script src="${basePath!}/static/js/distpicker.js"></script>
		<script src="${basePath!}/static/js/main.js"></script>
	</head>

	<body>
		<!--头 -->
		<header>
			<article>
				<div class="mt-logo">
					<!--顶部导航条 -->
					<div class="am-container header">
						<ul class="message-l">
							<div class="topMessage">
								<div class="menu-hd">
									<#if (userInfo)??>
										欢迎您,<a href="${basePath!}/shopping/personal/center/personalCenter.do" target="_top" class="h" style="color:red;">${userInfo.userName}</a>
									<#else>
										<a href="${basePath!}/login.do" target="_top" class="h">亲，请登录</a>
										<a href="#" target="_top">免费注册</a>
									</#if>
								</div>
							</div>
						</ul>
						<ul class="message-r">
							<div class="topMessage home">
								<div class="menu-hd"><a href="${basePath!}/index.do" target="_top" class="h">商城首页</a></div>
							</div>
							<div class="topMessage my-shangcheng">
								<div class="menu-hd MyShangcheng"><a href="${basePath!}/shopping/personal/center/personalCenter.do" target="_top"><i class="am-icon-user am-icon-fw"></i>个人中心</a></div>
							</div>
							<div class="topMessage mini-cart">
								<div class="menu-hd"><a id="mc-menu-hd" href="${basePath!}/shopping/personal/center/personalShopcart.do" target="_top"><i class="am-icon-shopping-cart  am-icon-fw"></i><span>购物车</span>(<strong class="h" style="color:red;">${shopcartGoodsCount}</strong>)</a></div>
							</div>
							<div class="topMessage favorite">
								<div class="menu-hd"><a href="${basePath!}/shopping/personal/center/personalCollection.do" target="_top"><i class="am-icon-heart am-icon-fw"></i><span>收藏夹</span></a></div>
						</ul>
						</div>

						<!--悬浮搜索框-->

						<div class="nav white">
							<div class="logoBig">
								<li><img src="http://p2s9wr3uo.bkt.clouddn.com/logobig.png" /></li>
							</div>

							<div class="search-bar pr">
								<a name="index_none_header_sysc" href="#"></a>
								<form action="${basePath!}/shopping/search/goods.do" method="get">
									<input id="searchInput" name="goodsName" type="text" placeholder="搜索" autocomplete="off">
									<input id="ai-topsearch" class="submit am-btn"  value="搜索" index="1" type="submit">
								</form>
							</div>
						</div>

						<div class="clear"></div>
					</div>
				</div>
			</article>
		</header>

		<div class="nav-table">
			<div class="long-title"><span class="all-goods">全部分类</span></div>
			<div class="nav-cont">
				<ul>
					<li class="index"><a href="${basePath!}/index.do">首页</a></li>
					<li class="qc"><a href="#">闪购</a></li>
					<li class="qc"><a href="#">限时抢</a></li>
					<li class="qc"><a href="#">团购</a></li>
					<li class="qc last"><a href="#">大包装</a></li>
				</ul>
			</div>
		</div>
		<b class="line"></b>

		<div class="center">
			<div class="col-main">
				<div class="main-wrap">

					<div class="user-address">
						<!--标题 -->
						<div class="am-cf am-padding">
							<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">地址管理</strong> / <small>Address&nbsp;list</small></div>
						</div>
						<hr/>
						<ul class="am-avg-sm-1 am-avg-md-3 am-thumbnails">
							
							<#list userAddress! as address>
								<#if address.recentlyUse>
									<li class="user-addresslist defaultAddr">
										<a href="${basePath!}/shopping/buyer/settingUserDefaultAddress.do?addressId=${address.addressId}">
											<span class="new-option-r"><i class="am-icon-check-circle"></i>默认地址</span>
										</a>
										<p class="new-tit new-p-re">
											<span class="new-txt">${address.takeUserName}</span>
											<span class="new-txt-rd2">${address.takeUserPhone}</span>
										</p>
										<div class="new-mu_l2a new-p-re">
											<p class="new-mu_l2cw">
												<span class="title">地址：</span>
												<span class="street">${address.province}&nbsp;${address.city}&nbsp;${address.district}&nbsp;${address.detailedAddress}</span></p>
										</div>
										<div class="new-addr-btn">
											<a href="#"><i class="am-icon-edit"></i>编辑</a>
											<span class="new-addr-bar">|</span>
											<a href="${basePath!}/shopping/buyer/deleteUserAddress.do?addressId=${address.addressId}"><i class="am-icon-trash"></i>删除</a>
										</div>
									</li>
								<#else>
									<li class="user-addresslist">
										<a href="${basePath!}/shopping/buyer/settingUserDefaultAddress.do?addressId=${address.addressId}">
											<span class="new-option-r"><i class="am-icon-check-circle"></i>默认地址</span>
										</a>
										<p class="new-tit new-p-re">
											<span class="new-txt">${address.takeUserName}</span>
											<span class="new-txt-rd2">${address.takeUserPhone}</span>
										</p>
										<div class="new-mu_l2a new-p-re">
											<p class="new-mu_l2cw">
												<span class="title">地址：</span>
												<span class="street">${address.province}&nbsp;${address.city}&nbsp;${address.district}&nbsp;${address.detailedAddress}</span></p>
										</div>
										<div class="new-addr-btn">
											<a href="#"><i class="am-icon-edit"></i>编辑</a>
											<span class="new-addr-bar">|</span>
											<a href="${basePath!}/shopping/buyer/deleteUserAddress.do?addressId=${address.addressId}"><i class="am-icon-trash"></i>删除</a>
										</div>
									</li>
								</#if>
							</#list>			
							
						</ul>
						<div class="clear"></div>
						<a class="new-abtn-type" data-am-modal="{target: '#doc-modal-1', closeViaDimmer: 0}">添加新地址</a>
						<!--例子-->
						<div class="am-modal am-modal-no-btn" id="doc-modal-1">

							<div class="add-dress">

								<!--标题 -->
								<div class="am-cf am-padding">
									<div class="am-fl am-cf"><strong class="am-text-danger am-text-lg">新增地址</strong> / <small>Add&nbsp;address</small></div>
								</div>
								<hr/>

								<div class="am-u-md-12 am-u-lg-8" style="margin-top: 20px;">
									<h4 style="text-align:center;color:red;font-size:12px;">${errorMsg!}</h4>
									<h4 style="text-align:center;color:green;font-size:12px;">${successfulMsg!}</h4>
									<div class="am-form am-form-horizontal">

										<form id="personAddressAddForm" action="${basePath!}/shopping/buyer/updateUserAddress.do" method="post" >
											<div class="am-form-group">
												<label for="user-name" class="am-form-label">收货人</label>
												<div class="am-form-content">
													<input type="text" id="user-name" placeholder="收货人" name="takeUserName">
												</div>
											</div>
	
											<div class="am-form-group">
												<label for="user-phone" class="am-form-label">手机号码</label>
												<div class="am-form-content">
													<input id="user-phone" placeholder="手机号必填" type="email" name="takeUserPhone">
												</div>
											</div>
											<div class="am-form-group" data-toggle="distpicker">
												<label for="user-address" class="am-form-label">所在地</label>
												<div class="am-form-content address">
													<select class="form-control" name="province" id="province1"><option value="" data-code="">—— 省 ——</option><option value="北京市" data-code="110000" selected="">北京市</option><option value="天津市" data-code="120000">天津市</option><option value="河北省" data-code="130000">河北省</option><option value="山西省" data-code="140000">山西省</option><option value="内蒙古自治区" data-code="150000">内蒙古自治区</option><option value="辽宁省" data-code="210000">辽宁省</option><option value="吉林省" data-code="220000">吉林省</option><option value="黑龙江省" data-code="230000">黑龙江省</option><option value="上海市" data-code="310000">上海市</option><option value="江苏省" data-code="320000">江苏省</option><option value="浙江省" data-code="330000">浙江省</option><option value="安徽省" data-code="340000">安徽省</option><option value="福建省" data-code="350000">福建省</option><option value="江西省" data-code="360000">江西省</option><option value="山东省" data-code="370000">山东省</option><option value="河南省" data-code="410000">河南省</option><option value="湖北省" data-code="420000">湖北省</option><option value="湖南省" data-code="430000">湖南省</option><option value="广东省" data-code="440000">广东省</option><option value="广西壮族自治区" data-code="450000">广西壮族自治区</option><option value="海南省" data-code="460000">海南省</option><option value="重庆市" data-code="500000">重庆市</option><option value="四川省" data-code="510000">四川省</option><option value="贵州省" data-code="520000">贵州省</option><option value="云南省" data-code="530000">云南省</option><option value="西藏自治区" data-code="540000">西藏自治区</option><option value="陕西省" data-code="610000">陕西省</option><option value="甘肃省" data-code="620000">甘肃省</option><option value="青海省" data-code="630000">青海省</option><option value="宁夏回族自治区" data-code="640000">宁夏回族自治区</option><option value="新疆维吾尔自治区" data-code="650000">新疆维吾尔自治区</option><option value="台湾省" data-code="710000">台湾省</option><option value="香港特别行政区" data-code="810000">香港特别行政区</option><option value="澳门特别行政区" data-code="820000">澳门特别行政区</option></select>
													<select class="form-control" name="city" id="city1"><option value="" data-code="">—— 市 ——</option><option value="北京市市辖区" data-code="110100" selected="">北京市市辖区</option></select>
													<select class="form-control" name="district" id="district1"><option value="" data-code="">—— 区 ——</option><option value="东城区" data-code="110101" selected="">东城区</option><option value="西城区" data-code="110102">西城区</option><option value="朝阳区" data-code="110105">朝阳区</option><option value="丰台区" data-code="110106">丰台区</option><option value="石景山区" data-code="110107">石景山区</option><option value="海淀区" data-code="110108">海淀区</option><option value="门头沟区" data-code="110109">门头沟区</option><option value="房山区" data-code="110111">房山区</option><option value="通州区" data-code="110112">通州区</option><option value="顺义区" data-code="110113">顺义区</option><option value="昌平区" data-code="110114">昌平区</option><option value="大兴区" data-code="110115">大兴区</option><option value="怀柔区" data-code="110116">怀柔区</option><option value="平谷区" data-code="110117">平谷区</option><option value="密云区" data-code="110118">密云区</option><option value="延庆区" data-code="110119">延庆区</option></select>
												</div>
											</div>
	
											<div class="am-form-group">
												<label for="user-intro" class="am-form-label">详细地址</label>
												<div class="am-form-content">
													<textarea class="" rows="3" id="user-intro" placeholder="输入详细地址" name="detailedAddress"></textarea>
													<small>100字以内写出你的详细地址...</small>
												</div>
											</div>
										</form>

										<div class="am-form-group">
											<div class="am-u-sm-9 am-u-sm-push-3">
												<a class="am-btn am-btn-danger" onclick="document.getElementById('personAddressAddForm').submit()">保存</a>
												<a href="javascript: void(0)" class="am-close am-btn am-btn-danger" data-am-modal-close  onclick="document.getElementById('personAddressAddForm').reset()">取消</a>
											</div>
										</div>
									</div>
								</div>

							</div>

						</div>

					</div>

					<script type="text/javascript">
						$(document).ready(function() {							
							$(".new-option-r").click(function() {
								$(this).parent('.user-addresslist').addClass("defaultAddr").siblings().removeClass("defaultAddr");
							});
							
							var $ww = $(window).width();
							if($ww>640) {
								$("#doc-modal-1").removeClass("am-modal am-modal-no-btn")
							}
							
						})
					</script>

					<div class="clear"></div>

				</div>
				<!--底部-->
				${copyrightStatement}
			</div>

			<aside class="menu">
				<ul>
					<li class="person">
						<a href="${basePath!}/shopping/personal/center/personalCenter.do">个人中心</a>
					</li>
					<li class="person">
						<a href="#">个人资料</a>
						<ul>
							<li> <a href="${basePath!}/shopping/personal/center/personalInfo.do">个人信息</a></li>
							<li> <a href="${basePath!}/shopping/personal/center/personalSafety.do">安全设置</a></li>
							<li class="active"> <a href="${basePath!}/shopping/personal/center/personalAddress.do">收货地址</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的交易</a>
						<ul>
							<li><a href="${basePath!}/shopping/personal/center/personalOrder.do">订单管理</a></li>
							<li> <a href="${basePath!}/shopping/personal/center/personalRefund.do">退款售后</a></li>
						</ul>
					</li>
					<li class="person">
						<a href="#">我的资产</a>
						<ul>
							<li> <a href="${basePath!}/shopping/personal/center/personalCoupons.do">优惠券 </a></li>
							<li> <a href="${basePath!}/shopping/personal/center/personalBonus.do">红包</a></li>
							<li> <a href="${basePath!}/shopping/personal/center/personalBill.do">账单明细</a></li>
						</ul>
					</li>

					<li class="person">
						<a href="#">我的小窝</a>
						<ul>
							<li> <a href="${basePath!}/shopping/personal/center/personalCollection.do">收藏</a></li>
							<li> <a href="${basePath!}/shopping/personal/center/personalComment.do">评价</a></li>
							<li> <a href="${basePath!}/shopping/personal/center/personalNews.do">消息</a></li>
						</ul>
					</li>

				</ul>

			</aside>
		</div>

	</body>

</html>